package www.com.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import www.com.common.ListResult;
import www.com.entity.Film;
import www.com.entity.Student;
import www.com.service.StudentService;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired StudentService studentService;

    @GetMapping("")
    ListResult<Student> getStudentList(@Valid @ModelAttribute Student query){
        System.out.println(query.getPageSize()+ query.getName());
        return studentService.getStudentList(query);
    }
}
